home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds / kgdb.man < prev    next >
Text File  |  1990-10-18  |  4KB  |  107 lines

  1. ' Copyright 1989 Regents of the University of California
  2. ' Permission to use, copy, modify, and distribute this
  3. ' documentation for any purpose and without fee is hereby
  4. ' granted, provided that this notice appears in all copies.
  5. ' The University of California makes no representations about
  6. ' the suitability of this material for any purpose.  It is
  7. ' provided "as is" without express or implied warranty.
  8. ' $Header: /sprite/src/cmds/kgdb/RCS/kgdb.man,v 1.3 90/10/18 12:21:03 kupfer Exp $ SPRITE (Berkeley)
  9. .so \*(]ltmac.sprite
  10. .HS KGDB cmds
  11. .BS
  12. .SH NAME
  13. kgdb \- A kernel debugger based on GDB
  14. .SH SYNOPSIS
  15. .nf
  16. \fBkgdb\fR [\fI-mtm\fR]\ [\fIgdb options\fR] [\fIkernel\fR]
  17. .SH OPTIONS
  18. .IP "\fB\-mtm\fR" 14
  19. Invoke the debugger for the target machine given by tm.  If specified, this
  20. option must proceed all other options. The list of available target machines
  21. include sun2, sun3, sun4, and spur.
  22. .LP
  23. See the GNU GDB documentation for information about the rest of the available
  24. options.
  25. .BE
  26.  
  27. .SH DESCRIPTION
  28. .PP
  29. \fBKgdb\fR is a version of the GNU gdb debugger modified to debug Sprite
  30. kernels.
  31. This manual page only describes the parts of \fBkgdb\fR that differ 
  32. from \fBgdb\fR.  
  33. The reader is referred to the GNU GDB documentation and gdb manual page for a
  34. complete description of \fBgdb\fR.
  35. .SH "DIFFERENCES FROM GDB"
  36. .LP
  37. The "attach" and "detach" commands of \fBkgdb\fR differ from those of 
  38. \fBgdb\fR.  
  39. .IP "\fBattach\fR machine"
  40. The attach command of \fBkgdb\fR takes as an argument the hostname or 
  41. internet address of a Sprite machine to debug.  
  42. The command assumes that the specified machine is in the kernel 
  43. debugging stub and will wait for the machine to
  44. enter the debugger.  Once the connection to the machine is 
  45. established,
  46. the trap condition and any unprinted syslog messages are displayed.
  47. .IP "\fBdetach\fR [cont]"
  48. The detach command breaks the connection between \fBkgdb\fR and the
  49. currently attached machine.  If any argument is specified, the machine
  50. is continued before the connection is detached.  When used with the 
  51. "attach" command, the "detach" command allows debugging multiple machines 
  52. from the same \fBkgdb\fR session.
  53. .SH "ADDITIONS TO GDB"
  54. \fBKgdb\fR supports several commands not found in \fBgdb\fR.  The commands
  55. are:
  56. .IP "\fBpid\fR proc-id"
  57. The pid command sets the focus of the debugger on the  process whose
  58. process id is proc-id. 
  59. Once a process is choosen with the pid command,
  60. all stack reference commands such as "backtrace" and "frame" will reference
  61. this process's stack.  For example, the command "pid 0xa1139" followed
  62. by the "backtrace" command will display a stack backtrace of the process
  63. with pid of 0xa1139. Note that proc-id can be any expression supported by
  64. \fBkgdb\fR.
  65. .IP "\fBreboot\fR [string]"
  66. The reboot command reboots the current attached machine. The optional
  67. argument string is passed to the kernel routine Mach_MonReboot.  Note 
  68. that this command is the same as typing "print Mach_MonReboot(string)" followed
  69. by a break and a detach command except that the reboot command will work 
  70. even if no symbol table is loaded.
  71. .IP "\fBversion\fR"
  72. The version command prints the kernel version string of the 
  73. attached machine. This command outputs the same information as the
  74. command "print SpriteVersion()" but like the "reboot" command doesn't
  75. require a symbol table to be loaded.
  76. .IP "\fBdebug\fR hostname"
  77. The debug command is similar to the attach command differing only
  78. in the case when the specified machine is not already in the debugging stub.  
  79. Rather than waiting
  80. for the machine to enter the debugger like the attach command, the
  81. debug command will force the machine into the debugger using 
  82. the \fBkmsg\fR program. 
  83. In order for this command to work, 
  84. the \fBkmsg\fR program must be available in the current
  85. search path of \fBkgdb\fR. Because of its anti-social possiblities, 
  86. caution is urged in the use of the debug command.
  87. .SH "DELETIONS FROM GDB"
  88. .LP
  89. Several features of \fBgdb\fR are not available in \fBkgdb\fR because 
  90. they don't apply to kernel debugging.
  91. Missing features include the ability to start and kill programs with the 
  92. "run"
  93. and "kill" commands; to change the program's environment and
  94. terminal characteristics with the
  95. "set-env", "unset-env", "set-args", and "tty" commands;  
  96. and  to handle signals with
  97. "handle" and "signal" commands.  
  98. Additionaly, \fBgdb\fR's core file processing such as the 
  99. .B core
  100. command are also 
  101. not available in \fBkgdb\fR.
  102.  
  103. .SH KEYWORDS
  104. gdb, kernel, debugging, kmsg
  105.